// @import
import MyCoroutine from "./MyCoroutine";
import Time from "./Time";

// @const
const { ccclass, } = cc._decorator;

/**
 * 系统必须的
 */
@ccclass
export default class SystemRequired extends cc.Component {
    /**
     * onLoad
     */
    onLoad(): void {
    }

    /**
     * update
     * 
     * @param nDeltaTime 变化时间
     */
    update(nDeltaTime: number): void {
        Time.putTime(Date.now() / 1000);
        Time.putDeltaTime(nDeltaTime);
    }

    /**
     * lateUpdate
     */
    lateUpdate(): void {
        MyCoroutine.execALL();
    }
}
